<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript">
Ext.namespace('catalog.catalog.raportNepromovat');
catalog.catalog.raportNepromovat.SearchPanel = Ext.extend(catalog.ComplexGrid, {
    lastName:'Nume',
    firstName:'Prenume',
    avgSem1:'Semestrul 1',
    avgSem2:'Semestrul 2',
    totalAvg:'Media generala',

    initComponent:function() {
        searchURL = 'displayUnPromotedStudents.action?classId=' +<%=request.getParameter("classId")%>;
        var config = {
			compSet:[{url:0,reader:0,columns:0}],
			searchFields :[[
                            'Nume:', {xtype:'textfield', name:'teacherDisciplineStudentsDTO.lastName', width:120}
                            ]],
            urls: [searchURL],
	        readers : [[
	            {name: 'lastName'},
	            {name: 'firstName'},
	            {name: 'firstSemAvg'},
	            {name: 'secondSemAvg'},
                {name: 'finalAvg'}
	        ]],
            columnsArray: [[
                {header: this.lastName, width: 100, sortable: true, dataIndex: 'lastName'},
                {header: this.firstName, width: 100, sortable: true, dataIndex: 'firstName'},
                {header: this.avgSem1, width: 180, sortable: true, dataIndex: 'firstSemAvg'},
                {header: this.avgSem2, width: 180, sortable: true, dataIndex: 'secondSemAvg'},
                {header: this.totalAvg, width: 180, sortable: true, dataIndex: 'finalAvg'}

	        ]]

        }; // eo config object
        Ext.apply(this, Ext.apply(this.initialConfig, config));
        catalog.catalog.raportNepromovat.SearchPanel.superclass.initComponent.apply(this, arguments);
    }
});


try {raportNepromovatLocale();} catch (e) {}

Ext.onReady(function() {
    Ext.QuickTips.init();
    var formPanel = new catalog.catalog.raportNepromovat.SearchPanel();
    formPanel.store.reload();
    Ext.WindowMgr.getActive().add(formPanel);
    Ext.WindowMgr.getActive().doLayout();
});
</script>